ServiceCompat
Helper for accessing features in android.app.Service.
Types
Link copied to clipboard
Properties
Link copied to clipboard
Constant to return from onStartCommand: if this service's process is killed while it is started (after returning from onStartCommand), then leave it in the started state but don't retain this delivered intent.
Link copied to clipboard
Flag for stopForeground: if set, the notification previously provided to startForeground will be detached from the service.
Link copied to clipboard
Flag for stopForeground: if set, the notification previously provided to startForeground will be removed.
Functions
Link copied to clipboard
open fun startForeground(@NonNull service: @NonNull Service, id: Int, @NonNull notification: @NonNull Notification, foregroundServiceType: Int)
Link copied to clipboard
Remove the passed service from foreground state, allowing it to be killed if more memory is needed.